<template>
  <div>
    <div class="pay">
      <van-nav-bar
        style="z-index: 999; position: relative"
        :placeholder="true"
        fixed
        title="订单详情"
        left-arrow
        @click-left="$router.go(-1)"
      />
      <div class="active-type">
        <div>活动详情</div>
        <div>已完成</div>
      </div>
      <div class="orderList">
        <div class="orderItem">
          <div class="orderLef">
            <van-image
              width="85%"
              height="100%"
              fit="cover"
              radius="10"
              src="https://img01.yzcdn.cn/vant/cat.jpeg"
            />
          </div>
          <div class="orderRig">
            <div class="tit">{{ selectTicketInfo.info.name }}</div>
            <div class="tickets">{{ selectTicketInfo.info.ticketType }}</div>
            <div class="oRbottom">
              <p class="oRLeft">
                <span>{{ selectTicketInfo.info.description }}</span>
                <span>￥{{ selectTicketInfo.info.price }}</span>
              </p>
              <span style="color: #fff">x{{ selectTicketInfo.num }}</span>
            </div>
          </div>
        </div>
      </div>
      <div class="allMoney">
        <div class="monTop">
          <p style="font-size: 0.28rem">票品总价</p>
          <p style="font-size: 0.32rem">￥{{ allPrice }}</p>
        </div>
        <div class="monTop">
          <p style="font-size: 0.28rem">实付</p>
          <p style="font-size: 0.32rem">￥{{ allPrice }}</p>
        </div>
      </div>

      <div class="order-data">
        <div class="order-data-title">活动详情</div>
        <div class="order-data-info">
          <p>订单号：</p>
          <p>下单时间：</p>
          <p>支付时间：</p>
          <p>完成时间：</p>
        </div>
      </div>
      <div class="surePay">
        <div class="sureBtm">
          <van-button
            color="linear-gradient(to right, #575cfe, #5e80ff)"
            @click="toResult"
            style="width: 100%; border-radius: 0.3rem; margin-bottom: 0.3rem"
            >扫码加群</van-button
          >
          <van-button
            color="linear-gradient(to right, #575cfe, #5e80ff)"
            @click="toResult"
            style="width: 100%; border-radius: 0.3rem"
            >查看票券</van-button
          >
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { areaList } from "@vant/area-data";
import { mapState } from "vuex";
export default {
  name: "PayIndex",
  data() {
    return {
      activeTicketInfo: {},
      isRead: true,
      selectTicketInfo: {
        info: {
          name: "popping比赛",
          ticketType: "观众票",
          description: "观众票",
          price: "0.3",
        },
        num: 2,
      },
    };
  },
  computed: {
    allPrice() {
      return (
        Number(this.selectTicketInfo.num) *
        Number(this.selectTicketInfo.info.price)
      );
    },
  },
  methods: {
    toResult() {
      this.$router.push({
        path: "/payResult",
        query: {},
      });
    },
    showAgreement() {
      //             Dialog.alert({
      //   title: '用户购票代收费服务协议',
      //   message: '本协议为三方协议，三方分别为用户、上海舞侠信息有限公司（以下简称“本平台”或“舞匣DanceBox”）及赛事主办方。购票前，请您详细阅读《用户购票代收费服务协议》（以下简称为“本协议”）。当您点击“同意”后，本条款将在您和平台、赛事主办方之间建立法律效力。其中，本条款涉及您重要权益的重点条款',
      // }).then(() => {
      //   // on close
      // });
    },
  },
  async mounted() {},
};
</script>

<style lang="less" scoped>
.pay {
  padding: 0.25rem 0.25rem 25vh;
  font-size: 0.3rem;
  background: #1a1b30;
}

.active-type {
  display: flex;
  justify-content: space-between;
  color: lightgray;
  margin-bottom: 10px;
}

.surePay {
  position: fixed;
  bottom: 0;
  left: 0;
  background: #1c1e37;
  height: 17vh;
  color: #fff;
  width: 100%;
  padding: 0.3rem 0.3rem 0;

  .sureTop {
    width: 100%;
    display: flex;
    justify-content: center;
    color: #5f5f77;
    margin-bottom: 0.4rem;

    .sureIcon {
      color: #fff;
      border: 0.02rem solid #444475;
      background: #333561;
      margin-right: 0.1rem;
      border-radius: 0.1rem;
      width: 0.4rem;
      height: 0.4rem;
      font-size: 0.24rem;
      line-height: 0.4rem;
      text-align: center;
    }
  }

  .sureBtm {
  }
}

.order-data{
  border-top:1px solid #313247;
  padding-top: 0.6rem;
  .order-data-title{
    color: #6b6d84;
  }
  .order-data-info{
    color: #fff;
    p{
      margin-top: 0.2rem;
    }
  }
}

.allMoney {
  width: 100%;
  color: #fff;

  .monTop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
  }

  .monBtm {
    font-size: 0.25rem;
    color: #e8ebf1;
  }
}

.orderList {
  width: 100%;
  box-sizing: border-box;

  .orderItem {
    display: flex;
    justify-content: space-between;
    height: 2.6rem;
    font-size: 0.3rem;
    border-bottom: 1px solid #313247;
    padding-bottom: 0.3rem;
    margin-bottom: 0.2rem;

    .orderLef {
      width: 25%;
    }

    .orderRig {
      width: 75%;
      display: flex;
      flex-direction: column;
      justify-content: space-between;

      .tit {
        line-height: 0.5rem;
        font-size: 0.32rem;
      }

      .tickets {
        font-size: 0.24rem;
        width: 1.05rem;
        padding: 0.03rem 0;
        line-height: 0.4rem;
        border-radius: 0.14rem;
        text-align: center;
        color: #b5d9eb;
        background: #3f83f0;
      }

      .oRbottom {
        color: #6b6d84;
        font-size: 0.25rem;
        display: flex;
        justify-content: space-between;

        .oRLeft {
          width: 70%;
          display: flex;
          justify-content: space-between;
        }
      }
    }
  }
}

.orderList {
  color: #fff;
}

.dorderItem {
  width: 100%;
  margin-bottom: 0.3rem;

  .title {
    font-size: 0.36rem;
    margin-bottom: 0.12rem;
  }

  .engTit {
    font-size: 0.23rem;
    margin-bottom: 0.14rem;
  }
}
</style>
